cmake_minimum_required(VERSION 3.27)
project(main)

set(CMAKE_CXX_STANDARD 23)

include_directories(
        "ThirdParty/SDL2-devel-2.28.5-mingw/SDL2-2.28.5/x86_64-w64-mingw32/include"
        "Include"
        "Tests"
)
link_directories(
        "ThirdParty/SDL2-devel-2.28.5-mingw/SDL2-2.28.5/x86_64-w64-mingw32/lib"
)
#不要启动控制台窗口
add_compile_options("-Wl, subsystem, windows")
AUX_SOURCE_DIRECTORY(Tests SRC)

add_executable(main main.cpp ${SRC})



target_link_libraries(main PRIVATE
        SDL2
        SDL2main
        SDL2_image
        SDL2_mixer
        SDL2_ttf
)
file(GLOB allCopyFiles  "Resources/*")
file(COPY ${allCopyFiles} DESTINATION Resources/)

file(GLOB allDepsDllFiles "DllFiles/*")
file(COPY ${allDepsDllFiles} DESTINATION ./)


# Other Demos
AUX_SOURCE_DIRECTORY(Demos/Game1/Sources Game1_SRC)
add_executable(Game1 Demos/Game1/main.cpp ${Game1_SRC})
target_include_directories(Game1 PRIVATE
        "ThirdParty/SDL2-devel-2.28.5-mingw/SDL2-2.28.5/x86_64-w64-mingw32/include"
)
target_link_directories(Game1 PRIVATE
        "ThirdParty/SDL2-devel-2.28.5-mingw/SDL2-2.28.5/x86_64-w64-mingw32/lib"
)

target_link_libraries(Game1 PRIVATE
        SDL2
        SDL2main
        SDL2_image
        SDL2_mixer
        SDL2_ttf
)




#enable_testing()
##add_test(NAME ${PROJECT_NAME}
##    COMMAND ${PROJECT_NAME}
##)


